from django.contrib import admin

from .models import BookInfo, HeroInfo
# Register your models here.

class BookInfoAdmin(admin.ModelAdmin):
    """自定义模型站点管理类"""
    list_per_page = 2  # 每页显示两条数据
    list_display = ['id', 'btitle', 'bpub_date', 'bread']  # 控制列表界面显示那些数据
    search_fields = ['id', 'btitle']  # 搜索
    list_filter = ['is_delete']


admin.site.register(BookInfo, BookInfoAdmin)  # 注册模型到admin站点中
admin.site.register(HeroInfo)  # 注册模型到admin站点中
